{% extends "base.html" %}

{% block title %}预约潜水 - 万岛潜水{% endblock %}

{% block content %}
<div class="container mt-5">
    <div class="row">
        <div class="col-md-8 offset-md-2">
            <div class="card">
                <div class="card-header bg-primary text-white">
                    <h4 class="mb-0">预约潜水</h4>
                </div>
                <div class="card-body">
                    <form method="post">
                        {{ form.hidden_tag() }}
                        
                        <div class="mb-3">
                            {{ form.course.label(class="form-label") }}
                            {{ form.course(class="form-select") }}
                        </div>
                        
                        <div class="mb-3">
                            {{ form.coach.label(class="form-label") }}
                            {{ form.coach(class="form-select") }}
                            {% for error in form.coach.errors %}
                            <div class="text-danger">{{ error }}</div>
                            {% endfor %}
                        </div>
                        
                        <div class="mb-3">
                            {{ form.date.label(class="form-label") }}
                            {{ form.date(class="form-control datetimepicker", placeholder="选择日期和时间") }}
                            {% for error in form.date.errors %}
                            <div class="text-danger">{{ error }}</div>
                            {% endfor %}
                            <div class="form-text">请至少提前24小时预约</div>
                        </div>
                        
                        <div class="mb-3">
                            {{ form.participants.label(class="form-label") }}
                            {{ form.participants(class="form-control", type="number", min="1", max="10") }}
                            {% for error in form.participants.errors %}
                            <div class="text-danger">{{ error }}</div>
                            {% endfor %}
                        </div>
                        
                        <div class="mb-3 form-check">
                            {{ form.is_group(class="form-check-input") }}
                            {{ form.is_group.label(class="form-check-label") }}
                            <div class="form-text">选择拼团可以与其他潜水爱好者一起参加活动，享受更优惠的价格</div>
                        </div>
                        
                        <div class="d-grid">
                            {{ form.submit(class="btn btn-primary") }}
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %} 